﻿using System;
using System.Security.Principal;
using HtmlAgilityPack;

namespace ProjectFootball.Foundation
{
    public abstract class BaseImport
    {
        public BaseImport(ImportSite importSite, IPrincipal user)
        {
            this.ImportSite = importSite;
            this.User = user;
        }

        protected ImportSite ImportSite;
        protected IPrincipal User;

        protected static HtmlDocument GetHtmlDocument(Uri uri)
        {
            HtmlWeb web = new HtmlWeb();
            web.UsingCache = false;

            return web.Load(uri.AbsoluteUri);
        }
    }
}
